<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var myhttp = prompt('请输出你喜欢看的网址')
        var str = `<a herf='${myhttp}'>我叫蔡徐坤,我的特长是\n唱跳rap篮球！< /a>`
        alert(str)
        console.log('str');
    </script>
</body>

</html>